package function.playlist;

import function.Mp3File;
import tool.DBFileUtils;
import tool.Properties;

public abstract class SimplePlaylist {

	protected String genre;
	protected int size;

	public SimplePlaylist(String aGenre) {
		super();
		this.genre = aGenre;
		calculateSize();
	}

	protected void calculateSize() {
		String propsPath = DBFileUtils.getDBPropertiesPath(genre);
		Properties props =new Properties(propsPath);
		String value = props.getProperty("num");
		size = Integer.parseInt(value);
	}

	public int getSize() {
		return size;
	}
	
	public abstract Mp3File getMp3(int index);
}
